package cn.wolfcode.wolf2w.repository;

import cn.wolfcode.wolf2w.domain.Travel;
import cn.wolfcode.wolf2w.domain.UserInfo;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;

/**
 * 游记持久层接口
 */
public interface TravelRepository extends MongoRepository<Travel, String>{

    List<Travel> findByDestId(String destId, Pageable pageable);

    /**
     * 根据关键字查询目的地下的游记
     * @param keyword
     * @return
     */
    List<Travel> findByDestName(String keyword);
}
